
<template>
	<div>{{ str }}请联系系统管理员邮箱：hqs-swxreq@chinaunicom.cn</div>
</template>

<script setup name="AuthFail">
const str = ref('')
const param2Obj = () => {
	const url = window.location.href
	const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
	if (!search) {
		return {}
	}
	const obj = {}
	const searchArr = search.split('&')
	searchArr.forEach((v) => {
		const index = v.indexOf('=')
		if (index !== -1) {
			const name = v.substring(0, index)
			const val = v.substring(index + 1, v.length)
			obj[name] = val
		}
	})
	return obj
}

// 获取链接上的参数来判断是第几次进入
const params = param2Obj()
if (params.error_code) {
	if (params.error_code == 5010) {
		str.value = '用户不存在,'
	}
}
</script>

<style scoped lang="less">
.loging {
	width: 100vw;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
}
</style>